/**
 * 渐变颜色字体
 */
const beforeMount = (el: HTMLElement, { value }: any) => {
  // background: -webkit-linear-gradient(to right, rgb(97, 144, 232), rgb(167, 191, 232));
  el.style.backgroundImage = `
    -webkit-gradient(linear,
      0 10,
      0 bottom,
      from(#4776E6),
      to(#8e54e9))`;
  if (value) {
    el.style.backgroundImage = `
    -webkit-gradient(linear,
      0 ${value.top ? value.top : 10},
      0 bottom,
      from(${value.fromColor ? value.fromColor : '#4776E6'}),
      to(${value.toColor ? value.toColor : '#8e54e9'}))`;
  }
  el.style.webkitBackgroundClip = 'text';
  el.style.webkitTextFillColor = 'transparent';
}
export default { beforeMount }
